<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
	<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	%>
	<%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
	<script type="text/javascript" src="${path}/html/js/js-jsp/ba/role/roleOption.js?v=<%out.print(Math.random());%>"></script>
	<script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js"></script>
</head>
	<body>
		<div class="place">
			<span>当前位置：</span>
			<ul class="placeul">
				<li><a href="${path}/role/index.do" id="aa" style="background: transparent; border: none">角色管理</a></li>
				<li>
					<c:if test="${null == role.roId}">
						<a style="background: transparent; border: none;">添加角色</a>
					</c:if>
					<c:if test="${null != role.roId}">
						<a style="background: transparent; border: none;">编辑角色</a>
					</c:if>
				</li>
			</ul>
		</div>
		<form id="operate_form" class="form" method="post" action="#">
			<div class="formbody">
				<div class="gridFrom">
					<div class="formtitle"><span>基本信息</span></div>
					<dl>
						<dd>
							<input type="hidden" name="roId" id="roId" value="${role.roId}" />
							<span class="title" style="width:120px;">角色名称：</span>
							<input class="easyui-textbox" type="text" name="name" id="name" data-options="required:true,prompt:'请输入角色名称',validType:'length[1,16]'" missingMessage="角色名称不能为空" value="${role.name}" style="width:255px; height: 32px">
						</dd>
						<dd>
							<span class="title" style="width:120px;">数据权限：</span>
							<select class="select-commonDict" data-modelCode="BA" data-funCode="dataScope" defualt-value="${role.dataScope.cdId}" name="dataScope" id="dataScope"
									validType="selectNotEmpty['数据权限']" style="width:255px; height: 32px" editable="false">
							</select>
						</dd>
						<dd>
							<span class="title" style="width:120px;">是否系统数据：</span>
							<c:choose>

								<c:when test="${isSysAdmin}">
									<select class="easyui-combobox" validType="selectNotEmpty['是否系统数据']" name="isSys" id="isSys" style="width:255px; height: 32px" editable="false">
										<option value="" ${role.isSys ? "" : 'selected="selected"'}>--请选择--</option>
										<option value="1" ${role.isSys == 1 ? 'selected="selected"' : ''}>是(只有超管能修改)</option>
										<option value="2" ${role.isSys == 2 ? 'selected="selected"' : ''}>否(只要有角色修改权限的人员就能修改)</option>
									</select>
								</c:when>

								<c:otherwise>
									<select class="easyui-combobox" validType="selectNotEmpty['是否系统数据']" name="isSys" id="isSys" style="width:255px; height: 32px" editable="false">
										<option value="2" ${role.isSys == 2 ? 'selected="selected"' : ''}>否(只要有角色修改权限的人员就能修改)</option>
									</select>
								</c:otherwise>
							</c:choose>

						</dd>
						<dd>
							<span class="title" style="width:120px;">是否可用：</span>
							<select class="easyui-combobox" validType="selectNotEmpty['是否可用']" name="useable" id="useable" style="width:255px; height: 32px" editable="false">
								<option value="" ${role.useable ? "" : 'selected="selected"'}>--请选择--</option>
								<option value="1" ${role.useable == 1 ? 'selected="selected"' : ''}>启用</option>
								<option value="2"  ${role.useable == 2 ? 'selected="selected"' : ''}>禁用</option>
							</select>
						</dd>
						<dd>
							<span class="title" style="width:120px; vertical-align: top">备注信息：</span>
							<input class="easyui-textbox" name="remark" id="remark" data-options="multiline:true,prompt:'请输入备注信息',validType:'length[1,200]'" value="${role.remark}" style="width:255px;height:100px">
						</dd>
					</dl>
					<div class="formtitle"><span>角色权限</span></div>
					<dl>
						<dd style="float: left">
							<input type="hidden" name="menuIds" id="menuIds" value="${menuIds}" />
							<span class="title" style="width:120px;">权限勾选：</span>
						</dd>
						<dd>
							<ul class="easyui-tree" id="menuTree" style="display: inline-block"></ul>
						</dd>
					</dl>
				</div>
			</div>
		</form>
		<div class="formbody" style="margin-left: 125px">
			<a id="optionRole" class="easyui-linkbutton c1" style="width:120px; height: 35px">保存</a>
			&nbsp;&nbsp;&nbsp;
			<a href="${path}/role/index.do" class="easyui-linkbutton c1" style="width:120px; height: 35px">取消</a>
		</div>
	</body>
</html>